﻿using Domain.Entity.Basic_information;
using Domain.Entity.System_dictionary;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configer.System_dictionary
{
    public class Sys_dict_dataConfiger : IEntityTypeConfiguration<Sys_dict_data>
    {
        public void Configure(EntityTypeBuilder<Sys_dict_data> builder)
        {
            builder.ToTable(nameof(Sys_dict_data));
            builder.HasKey(e => e.Dict_code);
            builder.Property(e=>e.Dict_code).HasColumnType("bigint");
            builder.Property(e=>e.Dict_sort).HasColumnType("int");
            builder.Property(e=>e.Dict_label).HasColumnType("varchar(100)");
            builder.Property(e=>e.Dict_value).HasColumnType("varchar(100)");
            builder.Property(e=>e.Dict_type).HasColumnType("varchar(100)");
            builder.Property(e=>e.Css_class).HasColumnType("varchar(100)");
            builder.Property(e=>e.List_class).HasColumnType("varchar(100)");
            builder.Property(e=>e.Is_default).HasColumnType("char(4)").HasComment("Y是 N否");
            builder.Property(e=>e.Status).HasColumnType("int").HasComment("0正常 1停用");
            builder.Property(e=>e.Create_by).HasColumnType("varchar(64)");
            builder.Property(e=>e.Create_time).HasColumnType("DateTime");
            builder.Property(e=>e.Update_by).HasColumnType("varchar(64)");
            builder.Property(e=>e.Update_time).HasColumnType("DateTime");
            builder.Property(e=>e.Remark).HasColumnType("varchar(500)");
        }
    }
}
